<html>

<head>
	<meta charset="UTF-8">
	<title>Opções Giveaways</title>
	<link rel="stylesheet" type="text/css" href="<?php echo base_url('css/style.css');?>">
	<link href='http://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>
	<link href='http://fonts.googleapis.com/css?family=Raleway:300' rel='stylesheet' type='text/css'>
</head>


<body>

	<div class="header">
		<div id="wrapper">
			<div class="logo">
				<h1><a href="<?php echo base_url('/giveaways');?>">GIVEAWAYS</a></h1>
			</div>
			<div class="benvindo">Olá <?php echo $u_nome?></div>
			<div class="dropdown"> <span class="dropdown-toggle" tabindex="0"></span>
			  <div class="dropdown-text"></div>
			  <ul class="dropdown-content">
			    <li><a href="<?php echo base_url('/giveaways/editar_user');?>">Perfil</a></li>
			    <li><a href="<?php echo base_url('/giveaways/pesquisaGiveawaysUser');?>">Giveaways</a></li>
			    <li><a href="<?php echo base_url('/giveaways/logout');?>">Logout </a></li>
			  </ul>
			</div>
			<form method="post" action="<?php echo base_url('/giveaways/criar_giveaway');?>">
				<input name="add" id="add" value="" type="submit"/>
			</form>
		</div>
	</div>

	<div class="body">
			<div class="middle-registar">
				<div id="wrapper">
					<div class="form2">
						<div id="n_criados">Nº de Giveaways Criados: <?php echo $n_criados?></div>
						<div id="n_inscritos">Nº de Giveaways Inscritos: <?php echo $n_inscritos?></div>
						<div id="n_ganhos">Nº de Giveaways Ganhos: <?php echo $n_ganhos?></div>
						<div class="dropdown2"> <span class="dropdown2-toggle" tabindex="0"></span>
						  <div class="dropdown2-text">Editar/Eliminar</div>
						  <ul class="dropdown2-content">
						  	<?php
						  		json_encode($lista);
						  		foreach ($lista as $value)
						  		{
						  			echo "<li><div id='titulo'>" . $value->G_TITULO . "</div><a href='" . base_url() . "giveaways/editar_giveaway/" . $value->G_ID . "'><img src='" . base_url() . "imagens/edit-icon.png'></a><a href='" . base_url() . "giveaways/eliminar_giveaway/" . $value->G_ID . "'><img src='" . base_url() . "imagens/delete-icon.png'></a></li>";
						  		}

						  	?>
						  </ul>
						</div>
					</div>
				</div>
			</div>
	</div>

</body>
<script type="text/javascript"> 
	alert ('<?php echo $feedback?>');
</script>
</html>